package com.eye.catcher.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author huzhiwei
 * @since 2022-02-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TSysDaUserRole extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId("ID")
    private String id;

    /**
     * 用户id
     */
    @TableField("USER_ID")
    private String userId;
    /**
     * 来源
     */
    @TableField("SOURCE")
    private String source;
    /**
     * 角色id
     */
    @TableField("ROLE_ID")
    private String roleId;

    /**
     * 版本
     */
    @TableField("VERSION")
    private String version;

    /**
     * 最后操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("LAST_TIME")
    private LocalDateTime lastTime;

    /**
     * 1、只新增权限
     * 2、删除后新增权限
     */
    @TableField(exist = false)
    private String type;

    @TableField(exist = false)
    private String roleIds;

    @TableField(exist = false)
    private String userIds;
}
